<template>
  <view class="layOut pageBg" :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
    <view class="userInfo">
      <view class="avatar">
        <image src="../../static/logo.png" mode="scaleToFill" />
      </view>
      <view class="nickname">001</view>
      <view class="brief-introduction">个人简介</view>
      <view class="ip">来自于：河北</view>
    </view>
    <view class="section">
      <view class="list">
        <view class="row">
          <view class="left">
            <uni-icons type="download-filled" color="orange" size="24" />
            <view class="text">我的下载</view>
          </view>
          <view class="right">
            <uni-icons type="right" color="orange" size="24" />
          </view>
        </view>
      </view>
      <view class="list">
        <view class="row">
          <view class="left">
            <uni-icons type="download-filled" color="orange" size="24" />
            <view class="text">我的评分</view>
          </view>
          <view class="right">
            <uni-icons type="right" color="orange" size="24" />
          </view>
        </view>
      </view>
      <view class="list">
        <view class="row">
          <view class="left">
            <uni-icons type="download-filled" color="orange" size="24" />
            <view class="text">联系客服</view>
          </view>
          <view class="right">
            <uni-icons type="right" color="orange" size="24" />
          </view>
          <button open-type="contact">联系客服</button>
        </view>
      </view>
    </view>
    <view class="section">
      <view class="list">
        <view class="row">
          <view class="left">
            <uni-icons type="download-filled" color="orange" size="24" />
            <view class="text">订阅更新</view>
          </view>
          <view class="right">
            <uni-icons type="right" color="orange" size="24" />
          </view>
        </view>
      </view>
      <view class="list">
        <view class="row">
          <view class="left">
            <uni-icons type="download-filled" color="orange" size="24" />
            <view class="text">常见问题</view>
          </view>
          <view class="right">
            <uni-icons type="right" color="orange" size="24" />
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">
// 获取屏幕边界到安全区域距离
const { safeAreaInsets } = uni.getSystemInfoSync()
</script>

<style scoped lang="scss">
.layOut {
  .userInfo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 50rpx 0;
    .avatar {
      width: 160rpx;
      height: 160rpx;
      border-radius: 50%;
      overflow: hidden;
      image {
        width: 100%;
        height: 100%;
      }
    }
    .nickname {
      font-size: 44rpx;
      color: #333;
      padding: 20rpx 0 5rpx;
    }
    .ip {
      font-size: 24rpx;
      color: #aaa;
    }
    .brief-introduction {
      font-size: 24rpx;
      padding-bottom: 5rpx;
    }
  }
  .section {
    margin: 50rpx 28rpx;
    border: 1px solid #eee;
    border-radius: 10rpx;
    box-shadow: 0 0 30rpx rgba(0, 0, 0, 0.5);
    .list {
      .row {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #eee;
        padding: 0 30rpx;
        height: 100rpx;
        background: #fff;
        &:last-child {
          border-bottom: 0;
        }
        .left {
          display: flex;
          align-items: center;
          .text {
            padding-left: 20rpx;
            color: #666;
          }
        }
        .right {
          display: flex;
          align-items: center;
          .text {
            font-size: 28rpx;
            color: #aaa;
          }
        }
        button {
          position: absolute;
          top: 0;
          left: 0;
          height: 100%;
          width: 100%;
          opacity: 0;
        }
      }
    }
  }
}
</style>
